package org.charles.zhifou.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.charles.zhifou.enums.AppTypeEnum;
import org.charles.zhifou.enums.ScoringStrategyEnum;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 用户答题记录
 * @TableName user_answer
 */
@Data
public class UserAnswer implements Serializable {

    @Schema(description = "用户答案 id")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "应用 id")
    private Long appId;

    @Schema(description = "应用类型: 0-得分类, 1-角色测评类")
    private AppTypeEnum appType;

    @Schema(description = "评分策略: 0-自定义, 1-AI")
    private ScoringStrategyEnum scoringStrategy;

    @Schema(description = "用户答案 (JSON 数组)")
    private String choices;

    @Schema(description = "评分结果 id")
    private Long resultId;

    @Schema(description = "结果名称")
    private String resultName;

    @Schema(description = "结果描述")
    private String resultDesc;

    @Schema(description = "结果图标")
    private String resultPicture;

    @Schema(description = "得分")
    private Integer resultScore;

    @Schema(description = "用户 id")
    private Long userId;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "是否删除")
    @TableLogic
    @JsonIgnore
    private Integer isDeleted;

    @Serial
    private static final long serialVersionUID = 1L;
}